Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added: new functionality to be able to create a drag-handle #31

Merged
merged 4 commits into from
Dec 9, 2016
Merged

added: new functionality to be able to create a drag-handle #31

merged 4 commits into from
Dec 9, 2016

Conversation

maartentibau
Copy link
Contributor

Just a really simple addition, so a drag handle can be created. Only when the mouse down event happend on this element the dragging will fire.

@maartentibau
Copy link
Contributor Author

Sorry.. but I'm not that good with Git so needed to make a new PR. Made the changes like you asked.

@@ -479,6 +480,12 @@
* @param event {Object} event object
*/
mousedown: function (event) {
if (finalParams.dragHandleCssClass &&
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (finalParams.dragHandleCssClass &&
    (typeof finalParams.dragHandleCssClass !== 'string' ||
    !event.target.classList.contains(finalParams.dragHandleCssClass))) {
    return false;
}

@maartentibau
Copy link
Contributor Author

Sorry.. but I don't get this stupid Git, I make the change you suggest on my local branch, commit -amend and then try to push it to the origin branch but doesn't work, keeps saying something has changed and I need to merge or something.

Really don't know what I'm doing wrong.

@@ -481,8 +481,8 @@
*/
mousedown: function (event) {
if (finalParams.dragHandleCssClass &&
typeof finalParams.dragHandleCssClass === 'string' &&
!event.target.classList.contains(finalParams.dragHandleCssClass)) {
(typeof finalParams.dragHandleCssClass === 'string' ||
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typeof finalParams.dragHandleCssClass !== 'string'

@maartentibau
Copy link
Contributor Author

Fixed, my bad.

@sunpietro
Copy link
Owner

@Webtrix Thank you for your commitment

@sunpietro sunpietro merged commit 376cae2 into sunpietro:master Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants